/**
 * Copyright 2010 upTick Pty Ltd
 *
 * Licensed under the terms of the GNU General Public License version 3 
 * as published by the Free Software Foundation. You may obtain a copy of the
 * License at: http://www.gnu.org/copyleft/gpl.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations 
 * under the License. 
 */

package au.com.uptick.serendipity.client.sales.widgets;

import com.allen_sauer.gwt.log.client.Log;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.layout.HLayout;

public class Masthead extends HLayout {

    private static final int MASTHEAD_HEIGHT = 40;

    private static final String WEST_WIDTH = "20%";
    private static final String EAST_WIDTH = "*";
    private static final String NAME_LABEL = "GHI Corporation Pty Ltd<br /><b>Information</b>";

    public Masthead() {
        super();

        Log.debug("Masthead()");

        // initialise the Masthead layout container
        this.setStyleName("crm-Entity-Masthead");
        this.setHeight(MASTHEAD_HEIGHT);

        // initialise the Logo image
        // Img logo = new Img("icons/48/account.png", 46, 46);
        // logo.addStyleName("crm-Entity-Masthead-Logo");

        // initialise the West layout container
        HLayout westLayout = new HLayout();
        westLayout.setHeight(MASTHEAD_HEIGHT);
        westLayout.setWidth(WEST_WIDTH);
        // westLayout.addMember(logo);

        // initialise the Name label
        Label name = new Label();
        name.setStyleName("crm-Entity-Masthead-Name");
        name.setContents(NAME_LABEL);
        name.setWidth("*");

        // initialise the East layout container
        HLayout eastLayout = new HLayout();
        eastLayout.setHeight(MASTHEAD_HEIGHT);
        eastLayout.setWidth(EAST_WIDTH);
        eastLayout.addMember(name);

        // add the West and East layout containers to the Masthead layout container
        this.addMember(westLayout);
        this.addMember(eastLayout);
    }
}
